﻿using MediatR.Core.Request;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MediatR.Core.Handler
{
    public class MyRequestHandler : IRequestHandler<MyRequest, string>
    {
        public Task<string> Handle(MyRequest request, CancellationToken cancellationToken)
        {
            // 在这里处理请求的业务逻辑
            return Task.FromResult($"Hello, {request.Name}!");
        }
    }
}
